package co.edu.usbcali.museo.dataaccess.daoFactory;

import co.edu.usbcali.museo.dataaccess.dao.*;


/**
 * Factory for Data Access Objects Strategy The DAO pattern can be made highly flexible
 * by adopting the Abstract Factory [GoF] and the Factory Method [GoF] patterns.
 * When the underlying storage is not subject to change from one implementation to another,
 * this strategy can be implemented using the Factory Method pattern to produce a number of DAOs needed by the application.
 * This class is a Factory Method pattern
 *
 * @author Zathura Code Generator http://code.google.com/p/zathura
 */
public class JPADaoFactory {
    private static JPADaoFactory instance = null;

    private JPADaoFactory() {
    }

    /**
    *
    * @return JPADaoFactory
    */
    public static JPADaoFactory getInstance() {
        if (instance == null) {
            instance = new JPADaoFactory();
        }

        return instance;
    }

    /**
    * This method instantiates the IAutorDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return IAutorDAO implementationn
    */
    public IAutorDAO getAutorDAO() {
        return new AutorDAO();
    }

    /**
    * This method instantiates the ICuadroDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return ICuadroDAO implementation
    */
    public ICuadroDAO getCuadroDAO() {
        return new CuadroDAO();
    }

    /**
    * This method instantiates the IMuseoDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return IMuseoDAO implementation
    */
    public IMuseoDAO getMuseoDAO() {
        return new MuseoDAO();
    }

    /**
    * This method instantiates the IPeriodoDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return IPeriodoDAO implementation
    */
    public IPeriodoDAO getPeriodoDAO() {
        return new PeriodoDAO();
    }

    /**
    * This method instantiates the IRestauracionDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return IRestauracionDAO implementation
    */
    public IRestauracionDAO getRestauracionDAO() {
        return new RestauracionDAO();
    }

    /**
    * This method instantiates the ISesionDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return ISesionDAO implementation
    */
    public ISesionDAO getSesionDAO() {
        return new SesionDAO();
    }

    /**
    * This method instantiates the ITecnicaDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return ITecnicaDAO implementation
    */
    public ITecnicaDAO getTecnicaDAO() {
        return new TecnicaDAO();
    }

    /**
    * This method instantiates the ITipoestadoDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return ITipoestadoDAO implementation
    */
    public ITipoestadoDAO getTipoestadoDAO() {
        return new TipoestadoDAO();
    }
}
